import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path:'/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/tv',
    name: 'tv',
    component: () => import('../views/Tv')
  },
  {
    path: '/movie',
    name: 'movie',
    component: () => import('../views/Movie')
  },
  {
    path: '/anime',
    name: 'anime',
    component: () => import('../views/Anime')
  },
  {
    path: '/variety',
    name: 'variety',
    component: () => import('../views/Variety')
  },
  {
    path: '/hot',
    name: 'hot',
    component: () => import('../views/HotList')
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: () => import('../views/Detail')
  },
  {
    path: '/play/:id',
    name: 'play',
    component: () => import('../views/Play')
  },
  {
    path: '/message',
    name: 'message',
    component: () => import('../views/Message')
  },
  {
    path: '/search/:id',
    name: 'search',
    component: () => import('../views/Search')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
